//雇主详情完善信息
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:untitled1/app/broker/modules/serve/ServeBasicInfoUpdate.dart';
import 'package:untitled1/app/broker/modules/serve/ServeJobUpdate.dart';
import 'package:untitled1/app/res/myColors.dart';
import 'package:untitled1/app/utils/utilDialog.dart';
import 'package:untitled1/app/utils/utilRouter.dart';
import 'package:untitled1/app/widgets/TitleBar.dart';
import 'package:untitled1/app/widgets/base_page/BaseStatefulPage.dart';
import 'package:untitled1/app/widgets/toast/MyToast.dart';


import '../../../utils/utilScreen.dart';
import '../../../widgets/TextSelector.dart';
import 'ServeJobUpdateController.dart';

//家员简历
class ServeResume extends BaseStatefulPage {
  @override
  BaseStatefulPageState<BaseStatefulPage> createState() {
    return _ServeResumeState();
  }
}

class _ServeResumeState  extends BaseStatefulPageState<ServeResume> {



  var gender = '';

  @override
  Widget buildPage(BuildContext context) {
    return Scaffold(
      appBar: TitleBar(title: "家员简历"),
      body: Container(
        color: myColors.c_bg,
        child: Column(
          children: [
            Expanded(
              child: SingleChildScrollView(
                child: Column(
                  children: [

                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("基本信息","基本信息"),
                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("求职意向","求职意向"),
                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("工作经历","工作经历"),
                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("培训简历","培训简历"),
                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("家庭情况","家庭情况"),
                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("作品视频","作品视频"),
                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("作品图片","作品图片"),
                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("持有凭证","持有凭证"),
                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("检查报告","检查报告"),
                    Divider(height: 1, color: myColors.c_divider),
                    buildItem("检查报告","检查报告"),
                    Divider(height: 1, color: myColors.c_divider),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }



  // 通用信息项
  Widget buildItem(
    String title,
      String type,{
    bool showArrow = true,
    int maxLines = 1,
    bool isRequired = false, Color bgcolor = Colors.white,
    Function()? onTapFunction,
  }) {
    return Container(
        height: 40,
        color:bgcolor,
        padding: const EdgeInsets.only(left: 15, right: 15),
        child:Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Container(
              child:  Text(
                "${title}:",
                style: const TextStyle(fontSize: 14, color: myColors.c_191919),
              ),
            ),

            Expanded(child: InkWell(
              onTap: () {
                // if (onTapFunction == null) {
                //   return;
                // }
                if(type=="基本信息"){
                  utilRouter.to(ServeBasicInfoUpdate());
                }else if(type=="求职意向"){
                  utilRouter.to(ServeJobUpdate());
                }else{
                  MyToast.showSystemToast("正在开发中");
                }
              },
              child: Container(
                alignment: Alignment.centerRight,
                child:Image.asset('assets/app/jiahao.png', width: 20, height: 20,),
              ),
            ))
          ],
        )
    );
  }
  
}
